package lab02.test04;

//属性
public class Employee {
    public String name;
    public String num;
    public float salary;
    public float salaryIncrease;

    //初始化成员变量
    public Employee(String name, String num, float salary, float salaryIncrease) {
        this.name = name;
        this.num = num;
        this.salary = salary;
        this.salaryIncrease = salaryIncrease;
    }

    //计算工资总额
    public float sum() {
        return salary + salaryIncrease;
    }

    //set、get方法
    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setNum(String num) {
        this.num = num;
    }

    public String getNum() {
        return num;
    }

    public void setSalary(float salary) {
        this.salary = salary;
    }

    public float getSalary() {
        return salary;
    }

    public void setSalaryIncrease(float salaryIncrease) {
        this.salaryIncrease = salaryIncrease;
    }

    public float getSalaryIncrease() {
        return salaryIncrease;
    }
}
